<?php
/**
 *   Kaltura Browser - administrator/components/com_kaltura/views/instances/tmpl/default.php
 *   Author: Juan Dapena Paz (juan@bittingbits.com)
 *   Copyright (C) 2011 Bitting Bits S.L.
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
defined('_JEXEC') or die('Restricted access'); ?>
<form action="index.php" method="post" name="adminForm">
<div id="editcell">
	<table class="adminlist">
	<thead>
		<tr>
			<th width="20">
				<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count( $this->items ); ?>);" />
			</th>
			<th width="5">
				<?php echo JText::_('ID'); ?>
			</th>
			<th>
				<?php echo JText::_('KALTURA_INSTANCE_NAME'); ?>
			</th>
			<th>
				<?php echo JText::_('KALTURA_DESC'); ?>
			</th>
			<th>
				<?php echo JText::_('KALTURA_DBHOST'); ?>
			</th>
			<th>
				<?php echo JText::_('KALTURA_DBUSER'); ?>
			</th>
			<th>
				<?php echo JText::_('KALTURA_DBPASSWD'); ?>
			</th>
		</tr>
	</thead>
	<tfoot>
		<tr>
			<td colspan="7"><?php echo $this->pagination->getListFooter(); ?></td>
		</tr>
	</tfoot>
	<tbody>
		<?php
		$k = 0;
		$i = 0;
		foreach ($this->items as &$row) { 
		$checked = JHTML::_('grid.id', $i, $row->id); 
		$link = JRoute::_('index.php?option=com_kaltura&controller=instances&task=editinstances&cid[]='.$row->id); 
		$delete_link = JRoute::_('index.php?option=com_kaltura&controller=instances&task=directDelete&cid[]='.$row->id); ?>
		<tr class="<?php echo 'row'.$k; ?>">
			<td>
				<?php echo $checked; ?>
			</td>
			<td>
				<?php echo $row->id; ?>
			</td>
			<td>
				<?php echo $row->instance_name; ?>
			</td>
			<td>
				<?php echo $row->desc; ?>
			</td>
			<td>
				<?php echo $row->dbhost; ?>
			</td>
			<td>
				<?php echo $row->dbuser; ?>
			</td>
			<td>
				<?php echo $row->dbpasswd; ?>
			</td>
		</tr>
		<?php $k = 1 - $k; $i++; } ?>
	</tbody>
	</table>
</div>
<input type="hidden" name="option" value="com_kaltura" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="controller" value="instances" />
<input type="hidden" name="view" value="instances" />
</form>
